/*
 * @Author: Quinn
 * @Date: 2023-05-11 22:33:18
 * @LastEditors: 叽歪小Q
 * @Description:
 */
import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location) {
	return originalPush.call(this, location).catch((err) => err);
};

const routes = [
	{
		path: "",
		redirect: "/login",
	},
	{
		path: "/login",
		name: "Login",
		meta: { title: "登录" },
		component: () => import("../Login.vue"),
	},
	{
		path: "/quoteExport",
		name: "QuoteExport",
		meta: { title: "报价导出" },
		component: () => import("../quoteExport.vue"),
	},
	{
		path: "/html2canvas",
		name: "Html2canvas",
		meta: { title: "导出图片" },
		component: () => import("../html2canvas.vue"),
	},
];

let router = new VueRouter({
	mode: "hash",
	base: "/",
	routes,
});

export default router;

